extern int passcnt, movecnt, bestQuality;

int solve(int gather, int keepinit);
